#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class RepairRecord : Business.BusinessBase<RepairRecord, int>
	{
		#region Fields and Properties

		private String remark = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Remark
		{
			get { return remark; }
			set
			{
				if (value != remark)
				{
					MarkChanged("Remark");
					remark = value;
				}
			}
		}

		private String approverName = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String ApproverName
		{
			get { return approverName; }
			set
			{
				if (value != approverName)
				{
					MarkChanged("ApproverName");
					approverName = value;
				}
			}
		}

		private Byte repairState = 0;
		/// <summary>
		/// 
		/// </summary>
		public Byte RepairState
		{
			get { return repairState; }
			set
			{
				if (value != repairState)
				{
					MarkChanged("RepairState");
					repairState = value;
				}
			}
		}

		private String content = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Content
		{
			get { return content; }
			set
			{
				if (value != content)
				{
					MarkChanged("Content");
					content = value;
				}
			}
		}

		private DateTime applyingDate = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime ApplyingDate
		{
			get { return applyingDate; }
			set
			{
				if (value != applyingDate)
				{
					MarkChanged("ApplyingDate");
					applyingDate = value;
				}
			}
		}

		private String buildingNbr = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String BuildingNbr
		{
			get { return buildingNbr; }
			set
			{
				if (value != buildingNbr)
				{
					MarkChanged("BuildingNbr");
					buildingNbr = value;
				}
			}
		}

		private String roomNbr = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String RoomNbr
		{
			get { return roomNbr; }
			set
			{
				if (value != roomNbr)
				{
					MarkChanged("RoomNbr");
					roomNbr = value;
				}
			}
		}

		private String applicantName = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String ApplicantName
		{
			get { return applicantName; }
			set
			{
				if (value != applicantName)
				{
					MarkChanged("ApplicantName");
					applicantName = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public RepairRecord()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override RepairRecord DataSelect(int id)
		{
			return Services.DALService.RepairRecordService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.RepairRecordService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.RepairRecordService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.RepairRecordService.Delete(this);
		}

		#endregion Base overrides
	}
}
